<template>

	<div class="Pcenter">
		<SearchTop></SearchTop>
		<Footer></Footer>

		
		<div class="PcenterMain clearfix">
			<div class="userInfo">
				<div class="userInfoImg"></div>
				<div class="userInfoInf">
					<p class="userName">下午好,游客{{userName}}</p>

					<p class="userText">
						<span class="name">账号: <span>{{lenovoId}}</span></span>
						<a class="loginOut" @click="loginOut"></a>
						<!-- <a class="money">充值</a> -->
					</p>
					
					<p class="playSerList">
						<span class="text">最近在玩的游戏</span>
						<label class="listItem">
							<a @click="gameStart(item.softName,item.gameName,item.softId,item.serverId,item.serverName)" v-for="item in myGameList">{{item.gameName}}  {{item.serverName}}</a>
						</label>
					</p>
				</div>
			</div>
			<div class="myMain clearfix">
				<div class="myMainLeft">
					<a class="item" :class="tabIndex==index?'active':''" v-for="(item,index) in myGame" @click="tabClick(index)">
						<img :src="item.img" class="itemImg"/>
						<div class="itemText">{{item.name}}</div>
					</a>
				</div>
				<!-- 我的游戏tab  -->
				<div class="RightList clearfix" >
					<div class="myMainRight clearfix" v-for="(item,index) in listGame"  v-if="tabIndex==0" @mouseover="itemOver(index,$event)" @mouseout="itemOut(index,$event)">
						<img :src="item.gameImage" alt="" class="myMainRightImg"/>
						<div class="myMainRightSev">
							<p class="title">{{item.gameName}}</p>
							<p class="subTitle">
								<span class="lastPlay">最近玩的服</span>
								<!-- <span class="money">充值</span> -->
							</p>
							<div class="myGameListTwo" >
								<ul class="myGameListUl clearfix"  >
									<li class="listItem" v-for="(items,indexs) in item.myPlayGameList"><a @click="gameStart(item.gameInfos[0].softName,item.gameName,item.gameInfos[0].softId,item.gameInfos[0].serverId,item.gameInfos[0].serverName)">{{item.gameName}} <span>{{items.serverName}}</span></a></li>
								</ul>
								<p v-if="loadingFlase" class="loading"></p>
							</div>
						</div>
					</div>

				</div>
				<!-- 我的礼包tab -->
				<div class="myGift" v-if="tabIndex==1">
					<div class="myGiftTab"> 
						<a class="item" :class="myGiftTabIndex==index?'active':''" v-for="(item,index) in myGiftTab" @click="giftType(index)">{{item}}</a>
					</div>
					<div class="myGiftList clearfix" >
						<div class="myGiftItem" v-for="(item,index) in semyGift">
							<div class="img">
								<img :src="item.bag.imageMybag" alt=""/>
								<img class="type" src="../../../static/img/wguo.png" height="50" width="50"/>
							</div>
							<div class="itemName">
								<p class="name">{{item.name}}</p>
								<p class="time"> <span> 类型 : 新手礼包</span>    <span style="margin-left:0.3rem;">领取时间 : {{item.dewnTime | time}}</span></p>
							</div>
							<div class="giftNum">
								<div class="num" id="text">{{item.skd}}</div>
								<p @click="copy"><a >复制激活码</a></p>
								
							</div>
							<div class="startGame">
								<div class="details" @click="goGiftDeta(item.code)"><a>查看详情</a></div>
								<div class="enterGame" @click="gameStart(item.soft.softName,item.soft.softId)"><a>开始游戏</a></div>
							</div>
						</div>
					</div>

				</div>

			</div>
			<!-- 分页 -->
			
		    <div class="allGamePage"  v-if="noPage">
		            <div id="page">
		                <ul class="pagination">
		                    <li v-show="current != 1" @click="current-- && goto(current--)" ><a class="next">上一页</a></li>
		                    <li v-for="index in pages" @click="goto(index)" :key="index">
		                      <a :class="{'active':current == index}"   >{{index}}</a>
		                    </li>
		                    <li  v-show="allpage != current && allpage != 0" @click="current++ && goto(current++)"><a class="next" >下一页</a></li>
		                    <span class="allPage">共{{pages.length}}页</span>
		                    <span class="jump">到第</span><input class="pageNum" @keyup.enter="goto(gotoInput)" v-model="gotoInput"  /> <label>页</label> <input type="button"  @click="goto(gotoInput)" class="btnPage" value="确定"/>
		                </ul>
		            </div>
		    </div>
		

		</div>
			
		
	</div>
</template>
<script src="./script.js"></script>
<style scoped lang="less" src="./style.less"></style>




